<?php

namespace App\Serializer;


use League\Fractal\Serializer\ArraySerializer;

/**
 * Class CustomSerializer
 * @package App\Serializer
 */
class CustomSerializer extends ArraySerializer
{

    /**
     * @param string $resourceKey
     * @param array $data
     * @return array
     */
    public function collection($resourceKey, array $data)
    {
        return [
            'message' => 'success',
            'status_code' => 200,
            'data' => $data
        ];
    }

    /**
     * @param string $resourceKey
     * @param array $data
     * @return array
     */
    public function item($resourceKey, array $data)
    {
        return [
            'message' => 'success',
            'status_code' => 200,
            'data' => $data
        ];
    }

}